package com.sdtele.tta.operation;

import com.sdtele.tta.models.JsonRequest;
import com.sdtele.tta.models.JsonResponse;
import com.sdtele.tta.models.User;

/**
 * 操作类实现：GetUser(json.operation=getUser)
 * @author XCream
 *说明
 *8.31
 *9.01
 */
public class OperationGetUser extends Operation {

	@Override
	public JsonResponse handle(JsonRequest jsonRequest) {		
		JsonResponse jr = new JsonResponse();
		
		User user= (User)request.getSession().getAttribute("user");
		
		if(user !=null)
		{jr.setStatus(0);
		jr.setMessage("用户在有效期");
		jr.setEntity(request.getSession().getAttribute("user"));
		System.out.println(jr.getEntity());}
		else {
			jr.setStatus(0);
			jr.setMessage("用户不在有效期");
		
		}
		return jr;
	}

}
